
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			      console.h
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
						    Forrest Yu, 2005
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

#ifndef _ORANGES_CONSOLE_H_
#define _ORANGES_CONSOLE_H_


/* CONSOLE */
typedef struct s_console
{
	unsigned int	current_start_addr;	/* 当前显示到了什么位置	  */
	unsigned int	original_addr;		/* 当前控制台对应显存位置 */
	unsigned int	v_mem_limit;		/* 当前控制台占的显存大小 */
	unsigned int	cursor;			/* 当前光标位置 */
}CONSOLE;

#define SCR_UP	1	/* scroll forward */
#define SCR_DN	-1	/* scroll backward */

#define SCREEN_SIZE		(80 * 25)
#define SCREEN_WIDTH		80

#define DEFAULT_CHAR_COLOR	0x07	/* 0000 0111 黑底白字 */
#define TAB_COLOR	0x00	/* 0000 0000 黑底黑字，用于tab */
#define SEARCH_MODE_COLOR	0x04	/* 0000 0100 黑底红字 */
#define SEARCH_COLOR_FOR_TAB_AND_SPACR 0X44	/*红底红字 */
#define SEARCH_COLOR_FOR_SPACE 0X44	/*红底红字 */
//define colors
#define COLOR_BLUE 0x01		/* 0000 0001 黑底蓝字 */
#define COLOR_GREEN 0x02		/* 0000 0010 黑底绿字 */
#define COLOR_LIGHTBLUE 0x03		/* 0000 0011 黑底淡蓝字 */
#define COLOR_RED 0x04		/* 0000 0100 黑底红字 */
#define COLOR_PINK 0x05		/* 0000 0101 黑底紫字 */
#define COLOR_YELLOW 0x06		/* 0000 0110 黑底黄字 */
#define COLOR_WHITE 0x07		/* 0000 0111 黑底白字 */
  
#endif /* _ORANGES_CONSOLE_H_ */
